The present invention relates to storage devices, and more particularly to techniques for implementing virtual storage devices.
Virtualization is a technique that relates to the abstraction of one or more resources. A virtual machine is software that creates a virtualized environment between a computer platform and an operating system. One or more guest operating systems are part of the virtual machine. A virtual machine can, for example, be implemented by a software application that runs on a host operating system.
To implement a virtual machine, a virtual machine monitor (VMM) intercepts accesses to the storage device in the physical machine, and emulates the accesses. Whenever a guest operating system (OS) accesses the storage device via a read or write command, the VMM intercepts the access, and redirect the access to a host operating system (OS). At this point, the host OS accesses the storage device to read or write the required data. The data is usually stored in a file in the host OS file systems.
However, some problems arise when implementing a virtual machine. For example, each access to the storage device requires intervention by the host OS, which slows down the emulation. Also, the file emulating the storage device might be fragmented, which slows down even more guest OS sequential sector accesses, and makes the guest OS effort to keep files unfragmented useless.
Therefore, it would be desirable to provide techniques for virtualization that provide faster data accesses.